package com.room.search.service.dto;

import com.room.search.domain.enumeration.BkRoomTypeEnum;
import com.room.search.domain.enumeration.RoomRentMethodEnum;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * By   : ghd.bright
 * Time : 2022/3/10
 * Description:
 */
public class AddRoomGoodsDTO implements Serializable {

    private Long id;

    @NotNull
    private String title;
    @NotNull
    private BkRoomTypeEnum bkRoomType;
    private List<Long> featureIds;

    private List<Long> roomUserIds;

    private RoomSupportingFacilitiesDTO supportingFacility;
    private RoomTransactionPropertyDTO transactionProperty;
    private RoomBasicPropertyDTO basicProperty;
    private RoomRentBasicDTO rentBasic;

    private String roomSellPoint;
    private String communityIntroduction;
    private String roomIntroduction;
    //周边配套
    private String surroundingFacilities;
    //交通出行
    private String transportation;

    //户型图地址
    private String floorPlan;

    //租金
    private Integer rentPrice;
    //总价
    private Integer sumPrice;
    //每平米价格
    private Integer areaPrice;


    private Long communityId;

    //租房方式
    private RoomRentMethodEnum rentMethod;


//    private String address


    public List<Long> getRoomUserIds() {
        return roomUserIds;
    }

    public AddRoomGoodsDTO setRoomUserIds(List<Long> roomUserIds) {
        this.roomUserIds = roomUserIds;
        return this;
    }

    public RoomRentMethodEnum getRentMethod() {
        return rentMethod;
    }

    public AddRoomGoodsDTO setRentMethod(String rentMethod) {
        this.rentMethod = RoomRentMethodEnum.valueOf(rentMethod);
        return this;
    }

    public Integer getAreaPrice() {
        return areaPrice;
    }

    public AddRoomGoodsDTO setAreaPrice(Integer areaPrice) {
        this.areaPrice = areaPrice;
        return this;
    }

    public String getFloorPlan() {
        return floorPlan;
    }

    public AddRoomGoodsDTO setFloorPlan(String floorPlan) {
        this.floorPlan = floorPlan;
        return this;
    }

    public String getSurroundingFacilities() {
        return surroundingFacilities;
    }

    public AddRoomGoodsDTO setSurroundingFacilities(String surroundingFacilities) {
        this.surroundingFacilities = surroundingFacilities;
        return this;
    }

    public String getTransportation() {
        return transportation;
    }

    public AddRoomGoodsDTO setTransportation(String transportation) {
        this.transportation = transportation;
        return this;
    }


    public Integer getRentPrice() {
        return rentPrice;
    }

    public AddRoomGoodsDTO setRentPrice(Integer rentPrice) {
        this.rentPrice = rentPrice;
        return this;
    }

    public Integer getSumPrice() {
        return sumPrice;
    }

    public AddRoomGoodsDTO setSumPrice(Integer sumPrice) {
        this.sumPrice = sumPrice;
        return this;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public BkRoomTypeEnum getBkRoomType() {
        return bkRoomType;
    }

    public void setBkRoomType(String bkRoomType) {
        switch (bkRoomType) {
            case "2":
                this.bkRoomType = BkRoomTypeEnum.SECOND;
                break;
            case "1":
                this.bkRoomType = BkRoomTypeEnum.RENT;
                break;
            default:
                this.bkRoomType = BkRoomTypeEnum.NEW;
                break;
        }
    }

    public RoomRentBasicDTO getRentBasic() {
        return rentBasic;
    }

    public AddRoomGoodsDTO setRentBasic(RoomRentBasicDTO rentBasic) {
        this.rentBasic = rentBasic;
        return this;
    }

    public List<Long> getFeatureIds() {
        return featureIds;
    }

    public void setFeatureIds(List<Long> featureIds) {
        this.featureIds = featureIds;
    }

    public RoomSupportingFacilitiesDTO getSupportingFacility() {
        return supportingFacility;
    }

    public void setSupportingFacility(RoomSupportingFacilitiesDTO supportingFacility) {
        this.supportingFacility = supportingFacility;
    }

    public RoomTransactionPropertyDTO getTransactionProperty() {
        return transactionProperty;
    }

    public void setTransactionProperty(RoomTransactionPropertyDTO transactionProperty) {
        this.transactionProperty = transactionProperty;
    }

    public RoomBasicPropertyDTO getBasicProperty() {
        return basicProperty;
    }

    public void setBasicProperty(RoomBasicPropertyDTO basicProperty) {
        this.basicProperty = basicProperty;
    }

    public String getRoomSellPoint() {
        return roomSellPoint;
    }

    public void setRoomSellPoint(String roomSellPoint) {
        this.roomSellPoint = roomSellPoint;
    }

    public String getCommunityIntroduction() {
        return communityIntroduction;
    }

    public void setCommunityIntroduction(String communityIntroduction) {
        this.communityIntroduction = communityIntroduction;
    }

    public String getRoomIntroduction() {
        return roomIntroduction;
    }

    public void setRoomIntroduction(String roomIntroduction) {
        this.roomIntroduction = roomIntroduction;
    }

    public Long getCommunityId() {
        return communityId;
    }

    public void setCommunityId(Long communityId) {
        this.communityId = communityId;
    }

    @Override
    public String toString() {
        return "AddRoomGoodsDTO{" +
            "bkRoomType='" + bkRoomType + '\'' +
            ", FeatureIds=" + featureIds +
            ", supportingFacility=" + supportingFacility +
            ", transactionProperty=" + transactionProperty +
            ", basicProperty=" + basicProperty +
            ", roomSellPoint='" + roomSellPoint + '\'' +
            ", communityIntroduction='" + communityIntroduction + '\'' +
            ", roomIntroduction='" + roomIntroduction + '\'' +
            ", communityId=" + communityId +
            '}';
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
